package com.koron.order.linepatrol.base.bean.po;

/**
 * @ClassName PatrolStatus
 * @description
 * @Author zhouj
 * @Date 2021/11/18 11:51
 */
public enum PatrolStatus {

    WAIT_PATROL("WAIT_PATROL", "待巡视", 1),
    IN_PATROL("IN_PATROL", "巡视中", 2),
    END_PATROL("END_PATROL", "已巡视", 3),
    NO_PATROL("NO_PATROL", "不巡视", 4);

    private String status;
    private String desc;
    private int sort;

    PatrolStatus(String var1, String var2, int sort) {
        this.status = var1;
        this.desc = var2;
        this.sort = sort;
    }

    public String getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public int getSort() {
        return sort;
    }

    public static PatrolStatus getPatrolStatus(String status) {

        switch (status) {
            case "WAIT_PATROL":
                return WAIT_PATROL;
            case "IN_PATROL":
                return IN_PATROL;
            case "END_PATROL":
                return END_PATROL;
            case "NO_PATROL":
                return NO_PATROL;
        }
        return null;
    }

}
